﻿using System;

namespace Flowertwig.Utils.Compression.General
{
    /// <summary>
    /// Arguments passed when scan failures are detected.
    /// </summary>
    public class ScanFailureEventArgs
    {
        /// <summary>
        /// Initialise a new instance of <see cref="ScanFailureEventArgs"></see>
        /// </summary>
        /// <param name="name">The name to apply.</param>
        /// <param name="e">The exception to use.</param>
        public ScanFailureEventArgs(string name, Exception e)
        {
            this.name = name;
            this.exception = e;
            continueRunning = true;
        }

        string name;

        /// <summary>
        /// The applicable name.
        /// </summary>
        public string Name
        {
            get { return name; }
        }

        Exception exception;

        /// <summary>
        /// The applicable exception.
        /// </summary>
        public Exception Exception
        {
            get { return exception; }
        }

        bool continueRunning;

        /// <summary>
        /// Get / set a value indicating wether scanning should continue.
        /// </summary>
        public bool ContinueRunning
        {
            get { return continueRunning; }
            set { continueRunning = value; }
        }
    }
}